package com.ybkj.daijia.server.dockingsupervise.zhuanche;

import java.io.Serializable;
import java.util.Date;

/**
 * 乘客备案
 *
 * @author Administrator
 */
public class CkbaMessage implements Serializable {

    private static final long serialVersionUID = -5179042798209031456L;

    private String type = Type.MOREQ_CKBA;//类功能

    private Long id;//编号

    private Date registerDate;//注册日期

    private String identityNumber;//身份证号

    private String passengerName;//乘客称谓

    private String passengerTel;//乘客手机号

    private String sex;//性别

    private String appKey;//appKey

    private Date created;//创建时间

    private Date updated;//更新时间


    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }


    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public Date getRegisterDate() {
        return registerDate;
    }

    public void setRegisterDate(Date registerDate) {
        this.registerDate = registerDate;
    }

    public String getIdentityNumber() {
        return identityNumber;
    }

    public void setIdentityNumber(String identityNumber) {
        this.identityNumber = identityNumber == null ? null : identityNumber.trim();
    }

    public String getPassengerName() {
        return passengerName;
    }

    public void setPassengerName(String passengerName) {
        this.passengerName = passengerName == null ? null : passengerName.trim();
    }

    public String getPassengerTel() {
        return passengerTel;
    }

    public void setPassengerTel(String passengerTel) {
        this.passengerTel = passengerTel == null ? null : passengerTel.trim();
    }

    public String getSex() {
        return sex;
    }

    public void setSex(String sex) {
        this.sex = sex;
    }

    public String getAppKey() {
        return appKey;
    }

    public void setAppKey(String appKey) {
        this.appKey = appKey == null ? null : appKey.trim();
    }

    public Date getCreated() {
        return created;
    }

    public void setCreated(Date created) {
        this.created = created;
    }

    public Date getUpdated() {
        return updated;
    }

    public void setUpdated(Date updated) {
        this.updated = updated;
    }

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        CkbaMessage other = (CkbaMessage) that;
        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
            && (this.getRegisterDate() == null ? other.getRegisterDate() == null
            : this.getRegisterDate().equals(other.getRegisterDate()))
            && (this.getIdentityNumber() == null ? other.getIdentityNumber() == null
            : this.getIdentityNumber().equals(other.getIdentityNumber()))
            && (this.getPassengerName() == null ? other.getPassengerName() == null
            : this.getPassengerName().equals(other.getPassengerName()))
            && (this.getPassengerTel() == null ? other.getPassengerTel() == null
            : this.getPassengerTel().equals(other.getPassengerTel()))
            && (this.getSex() == null ? other.getSex() == null
            : this.getSex().equals(other.getSex()))
            && (this.getAppKey() == null ? other.getAppKey() == null
            : this.getAppKey().equals(other.getAppKey()))
            && (this.getCreated() == null ? other.getCreated() == null
            : this.getCreated().equals(other.getCreated()))
            && (this.getUpdated() == null ? other.getUpdated() == null
            : this.getUpdated().equals(other.getUpdated()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
        result = prime * result + ((getRegisterDate() == null) ? 0 : getRegisterDate().hashCode());
        result =
            prime * result + ((getIdentityNumber() == null) ? 0 : getIdentityNumber().hashCode());
        result =
            prime * result + ((getPassengerName() == null) ? 0 : getPassengerName().hashCode());
        result = prime * result + ((getPassengerTel() == null) ? 0 : getPassengerTel().hashCode());
        result = prime * result + ((getSex() == null) ? 0 : getSex().hashCode());
        result = prime * result + ((getAppKey() == null) ? 0 : getAppKey().hashCode());
        result = prime * result + ((getCreated() == null) ? 0 : getCreated().hashCode());
        result = prime * result + ((getUpdated() == null) ? 0 : getUpdated().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", registerDate=").append(registerDate);
        sb.append(", identityNumber=").append(identityNumber);
        sb.append(", passengerName=").append(passengerName);
        sb.append(", passengerTel=").append(passengerTel);
        sb.append(", sex=").append(sex);
        sb.append(", appKey=").append(appKey);
        sb.append(", created=").append(created);
        sb.append(", updated=").append(updated);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}
